package com.gxa.core.recycling.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

//回收预约订单表
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "recycleorder")   //创建数据表注解
@Entity   //ORM 对象关系映射的关键主键
public class Recycleorder implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    //回收预约订单id
    @Column(name = "id")
    private Long id;
    @Column(name = "uid")
    //用户id
    private Long uid;
    @Column(name = "did")
    //服务地址id
    private Long did;
    @Column(name = "hid")
    //回收员id
    private Long hid;
    @Column(name = "state")
    //预约单状态
    private String state;
    @Column(name = "ordertime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    //下单时间
    private Date ordertime;
    @Column(name = "zid")
    //周期上门id
    private Long zid;
    @Column(name = "code")
    //上门取件验证码，也叫随机码
    private String code;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @Column(name = "recoverytime")

    //回收时间
    private Date recoverytime;
    @Column(name = "title")
    //该订单的大类别回收物，比如物品：塑料，废纸
    private String title;
    @Column(name="rtime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    //入库时间
    private Date rtime;
    @Column(name="ytime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    //预约时间
    private Date ytime;
}
